package com.xhwy.service;

import com.xhwy.entity.ShoppingCart;
import com.xhwy.param.ShoppingCartSaveParam;
import com.xhwy.param.UserIdParam;
import com.xhwy.util.R;

public interface ShoppingCartService {

    /**
     * 添加购物车
     * @param shoppingCartSaveParam
     * @return
     */
    R add(ShoppingCartSaveParam shoppingCartSaveParam);

    /**
     * 返回购物车数据
     * @param userIdParam 已经校验过的用户id
     * @return
     */
    R getByUserId(UserIdParam userIdParam);

    /**
     * 更新购物车业务
     * @param shoppingCart
     * @return
     */
    R update(ShoppingCart shoppingCart);

    /**
     * 删除购物车数据
     * @param shoppingCart
     * @return
     */
    R delete(ShoppingCart shoppingCart);
}
